#include <bits/stdc++.h>
using namespace std;
long double pi = 3.14159265358979323;
const double EPS = 1e-12;
const int N = 1e6 + 5;
const int mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m;
  cin >> n >> m;
  for (int i = 0; i < n / 2; i++) {
    for (int j = 0; j < m; j++) {
      cout << i + 1 << " " << j + 1 << "\n";
      cout << n - i << " " << m - j << "\n";
    }
  }
  if (n & 1) {
    for (int j = 0; j < m / 2; j++) {
      cout << n / 2 + 1 << " " << j + 1 << "\n";
      cout << n / 2 + 1 << " " << m - j << "\n";
    }
    if (m & 1) cout << n / 2 + 1 << " " << m / 2 + 1 << "\n";
  }
  return 0;
}
